load(":rules.bzl", "mkdocs_project", "mkdocs_tree")
load("@bazel_skylib//rules:build_test.bzl", "build_test")

py_binary(
    name = "mkdocs",
    srcs = ["@pypi_mkdocs//:site-packages/mkdocs/__main__.py"],
    main = "@pypi_mkdocs//:site-packages/mkdocs/__main__.py",
    visibility = ["//visibility:public"],
    deps = [
        "@pypi_mdx_truly_sane_lists//:pkg",
        "@pypi_mkdocs//:pkg",
        "@pypi_mkdocs_glightbox//:pkg",
        "@pypi_mkdocs_material//:pkg",
        "@pypi_mkdocs_monorepo_plugin//:pkg",
        "@pypi_mkdocstrings//:pkg",
        "@pypi_mkdocstrings_python//:pkg",
        "@pypi_mkdoxy//:pkg",
    ],
)

mkdocs_tree(
    name = "example_tree",
    srcs = glob([
        "example_docs/**/*",
    ]),
)

mkdocs_project(
    name = "example_doc",
    srcs = [":example_tree"],
    config = "config_example.yml",
)

build_test(
    name = "mkdocs_project",
    targets = [
        ":example_doc",
    ],
)
